#include <bits/stdc++.h>
using namespace std;
int a[200002];
//bad
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int L = a[1];
  int ans = 1;
  int i = 2;
  while (i <= n) {
    int s = 0;
    while (i <= n && s <= L) {
      s += a[i];
      i++;
    }
    if (s >= L) {
      ans++;
      L = s;
    }
  }
  cout << ans;
  return 0;
}